import Vue from "vue";
import App from "./App.vue";

import '../statics/mui/css/mui.css';


import  mintui from 'mint-ui';
Vue.use(mintui);
import 'mint-ui/lib/style.css'

import '../statics/mui/css/icons-extra.css'

import VueRouter from 'vue-router';
Vue.use(VueRouter);
import home from './component/home.vue'
import car from './component/shopcar/car.vue'

import '../statics/css/site.css';

import vueResource from 'vue-resource';
Vue.use(vueResource);
import newslist from './component/news/newslist.vue';
import moment from 'moment';

import newsinfo from './component/news/newsinfo.vue';
import photolist from './component/photo/photolist.vue';
import photoinfo from './component/photo/photoinfo.vue';
import goodslist from './component/goods/goodslist.vue';
import goodsinfo from './component/goods/goodsinfo.vue';
import goodsdesc from './component/goods/goodsdesc.vue';
import goodscomment from './component/goods/goodscomment.vue';

import VuePreview from 'vue-preview'
Vue.use(VuePreview)

Vue.filter("datefmt",function(input,str){
	return moment(input).format(str)
})

var router1 = new VueRouter({
	linkActiveClass:"mui-active",
	routes:[
		{path:'/',redirect:'/home'},
		{path:'/home',component:home},
		{path:'/car',component:car},
        {path:'/news/newslist',component:newslist},
        {path:'/news/newsinfo/:id',component:newsinfo},
        {path:'/photo/photolist',component:photolist},
        {path:'/photo/photoinfo/:id',component:photoinfo},
        {path:'/goods/goodslist',component:goodslist},
        {path:'/goods/goodsinfo/:id',component:goodsinfo},
        {path:'/goods/goodsdesc/:id',component:goodsdesc},
        {path:'/goods/goodscomment/:id',component:goodscomment},
	]
})
new Vue({
	el:"#app",
	// render:function(create){
	// 	create(App)
	// }
	router : router1,
	render:c=>c(App)

})

